package com.example.kotlin.model

import xyz.erupt.annotation.*
import xyz.erupt.annotation.sub_erupt.*
import xyz.erupt.annotation.sub_field.*
import xyz.erupt.jpa.model.*
import javax.persistence.*

@Erupt(
    name = "图书类别",
    drills = [
        Drill(
            code = "drill_1",
            title = "数据钻取",
            link = Link(linkErupt = Book::class, joinColumn = "category.id"),
        )
    ],
)
@Table(name = "t_category")
@Entity
class Category : BaseModel() {

    @EruptField(
        views = [View(title = "类别名称", sortable = true)],
        edit = Edit(title = "类别名称", notNull = true),
    )
    var name: String = ""

}
